

Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux', 'ext/ux');
Ext.require([
    'Ext.tip.QuickTipManager'
]);

  /*     
Ext.application({
    name: 'BM',
    appFolder: 'app',
    controllers: [ 'Groups'],
    launch: function() {
    Ext.create('Ext.container.Viewport', {
            layout: 'fit',
            margins: '2 5 0 2',
            items: {
            		xtype:'grouplist'
            	}
            });
   
    }
});
 */ 
    /*   */
Ext.application({
    name: 'BM',
    appFolder: 'app',
    controllers: [ 'Mains','TokenBrowsers','BoxBrowsers','ShortSutControllers',
    			   'TokenOrders','CostItems','TokenCheckOuts','CustomerBooks',
    			   'BrowserButtons','TradeValids'],
    launch: function() {
    
       Ext.create('Ext.container.Viewport', {
            layout: 'border',
            margins: '2 5 0 2',
            items: [
            {
	            region: 'north',
	            items:{xtype:'shortsutbutton'}
            },{
	            region: 'west',
	            collapsible: true,
	            layout: 'border',
	            border: false,
	            split:true,
	            margins: '2 0 3 3',
	            width: 230,
	            minSize: 150,
	            maxSize: 350,
	            items:[
	            {
	            	layout:	'fit',
	                region:'north',
			        split: true,
			        height: 200,
	            	items:{xtype:'tokenorderinfo'}
	            },
	            {
	                region: 'center',
	                collapsible: false,
	                autoScroll: true
            	}
	            ]
        	},{
	            region: 'center',
	            layout: 'border',
	            //xtype:'tabpanel',
	            border: false,
	            items: [
	            {
	            	region: 'center',
	            	layout:'border',
	            	xtype:'tabpanel',
	            	items:[
		            	{
			            	layout: 'border',
			            	title:'手牌管理',
			            	id:'bath-tab-token',
			            	items:[
				            	{
					            region: 'north',
					            height:30,
					            layout:'fit',
					            items:{xtype:'tokengroupbutton'}
			            	  	},{
				                region: 'center',
				            	layout:	'fit',
				            	autoScroll:true,
				            	items:{
				            		xtype:'tokenbrowser',
				            		id: 'token-chooser-view'
				            	}
				             	}
		            		]
		            	},{
		            		layout: 'border',
		            		title:'包间管理',
		            		id:'bath-tab-box',
		            		items:[
			            		{
					            region: 'north',
					            height:30,
					            layout:'fit',
					            items:{xtype:'boxgroupbutton'}
			            	  	},{
				                region: 'center',
				            	layout:	'fit',
				            	autoScroll:true,
				            	items:{
			            		    xtype:'boxbrowser',
				            		id: 'box-chooser-view'
				            	}
				             	}
		            		]
		            	}
	            	]
	            },{
	                region: 'south',
					height:30,
					items:{
	            		xtype:'filterbutton'
	            	}} 
	            ]
        	},{
	            region: 'south',
	            height:120,
	            layout:'fit',
	            items:{
	            	xtype:'costdetaillist'
	            }
        }]
        });

    }
});   